
.PHONY: all test clean docker
all:
	mvn compile -Dmaven.test.skip=true

test:
	mvn test
clean:
	mvn clean -Dmaven.test.skip=true

#docker:
#	mvn package -Dmaven.test.skip=true
#	cp ./target/webchat-web-1.0-SNAPSHOT.jar ./target/dockerfiles/
#	cp ./Dockerfile ./target/dockerfiles/
#	docker build -t 127.0.0.1:5000/webchat/webchat-web:$$(cat VERSION) ./target/dockerfiles
#	docker push 127.0.0.1:5000/webchat/webchat-web:$$(cat VERSION)
#	docker tag 127.0.0.1:5000/webchat/webchat-web:$$(cat VERSION) 127.0.0.1:5000/webchat/webchat-web
	
docker: ./target/dockerfiles
	mvn package -Dmaven.test.skip=true
	cp ./target/webchat-web-1.0-SNAPSHOT.jar ./target/dockerfiles/
	cp ./Dockerfile ./target/dockerfiles/
	docker build -t webchat-web:$$(cat VERSION) ./target/dockerfiles
	docker tag webchat-web:$$(cat VERSION) webchat-web

./target/dockerfiles:
	mkdir ./target/dockerfiles -p